package com.gjy.es.util;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-02-14 09:50:33
 */
@Configuration
public class EsUtil {

    @Bean
    public RestHighLevelClient restHighLevelClient() {
        return new RestHighLevelClient(
                RestClient.builder(new HttpHost("101.42.141.104",
                        9200, "http"))
        );
    }
}
